#include "nano_signal_improved.hpp"
#include <iostream>

void func(){ std::cout << "func() "; }

struct A : public Tracked { 
  void func(){ std::cout << "A::func() "; } 
};

int main(int argc, char *argv[])
{
  Signal<void()> sig;
  sig.connect<&func>();
  
  {
    A _a;
    sig.connect<A, &A::func>(&_a);
    //Test binding to member functions works
    sig(); 
    std::cout << std::endl;
  }
  //Check the signal to A was automatically deleted
  sig();
  
  return EXIT_SUCCESS;
}
